<template>
  <div id="app">
    <CommonHeader></CommonHeader>
    <router-view></router-view>
    <CommonFooter></CommonFooter>
  </div>
</template>
<script>
  import CommonHeader from './components/CommonHeader';
  import CommonFooter from './components/CommonFooter';

  export default {
    name: 'App',
    components:{
      CommonHeader,
      CommonFooter
    },
    watch:{
      $route(to,from){
        if(to.path=='/train'){
          this.$store.dispatch('hideTrainList');
        }else{
          this.$store.dispatch('showTrainList');
        }
      }
    }
  }
</script>

<style>

#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

}
</style>
